{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# pip3 install multion\n",
    "# pip3 install swarms\n",
    "from multion.client import MultiOn\n",
    "from swarms import Agent\n",
    "import os\n",
    "from swarm_models.base_llm import BaseLLM\n",
    "\n",
    "def check_multion_api_key():\n",
    "    \"\"\"\n",
    "    Checks if the MultiOn API key is available in the environment variables.\n",
    "\n",
    "    Returns:\n",
    "        str: The MultiOn API key.\n",
    "    \"\"\"\n",
    "    api_key = os.getenv(\"MULTION_API_KEY\")\n",
    "    return api_key\n",
    "\n",
    "\n",
    "class MultiOnAgent(BaseLLM):\n",
    "    \"\"\"\n",
    "    Represents an agent that interacts with the MultiOn API to run tasks on a remote session.\n",
    "\n",
    "    Args:\n",
    "        api_key (str): The API key for accessing the MultiOn API.\n",
    "        url (str): The URL of the remote session.\n",
    "        *args: Variable length argument list.\n",
    "        **kwargs: Arbitrary keyword arguments.\n",
    "\n",
    "    Attributes:\n",
    "        client (MultiOn): The MultiOn client instance.\n",
    "        url (str): The URL of the remote session.\n",
    "        session_id (str): The ID of the current session.\n",
    "\n",
    "    Methods:\n",
    "        run: Runs a task on the remote session.\n",
    "    \"\"\"\n",
    "\n",
    "    def __init__(self, name: str = None, system_prompt: str = None, api_key: str = check_multion_api_key, url: str = \"https://huggingface.co/papers\", *args, **kwargs):\n",
    "        super().__init__(*args, **kwargs)\n",
    "        self.name = name\n",
    "        self.client = MultiOn(api_key=api_key)\n",
    "        self.url = url\n",
    "        self.system_prompt = system_prompt\n",
    "        self.session_id = None\n",
    "\n",
    "    def run(self, task: str, *args, **kwargs):\n",
    "        \"\"\"\n",
    "        Runs a task on the remote session.\n",
    "\n",
    "        Args:\n",
    "            task (str): The task to be executed on the remote session.\n",
    "            *args: Variable length argument list.\n",
    "            **kwargs: Arbitrary keyword arguments.\n",
    "        \"\"\"\n",
    "        # Create a new session\n",
    "        response = self.client.sessions.create(url=self.url, *args, **kwargs)\n",
    "        print(response.message)\n",
    "        self.session_id = response.session_id\n",
    "        \n",
    "        prompt = f\"{self.system_prompt} {task}\"\n",
    "        \n",
    "        # Keep stepping the session until the agent completes the task\n",
    "        while response.status == 'CONTINUE':\n",
    "            response = self.client.sessions.step(\n",
    "                session_id=self.session_id,\n",
    "                cmd=prompt,\n",
    "                include_screenshot=True,\n",
    "                *args,\n",
    "                **kwargs\n",
    "            )\n",
    "        \n",
    "        if response.status == 'DONE':\n",
    "            print('Task completed')\n",
    "        print(response.message)\n",
    "\n",
    "        # Capture a screenshot of the session\n",
    "        get_screenshot = self.client.sessions.screenshot(session_id=self.session_id, *args, **kwargs)\n",
    "        print(\"Screenshot of session: \", get_screenshot.screenshot)\n",
    "\n",
    "        # Close the session\n",
    "        close_session_response = self.client.sessions.close(session_id=self.session_id, *args, **kwargs)\n",
    "        print(\"Close session response: \", close_session_response)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "from swarms import MixtureOfAgents\n",
    "\n",
    "llm = MultiOnAgent(\n",
    "\tname = \"MultiOnAgent\",\n",
    ")\n",
    "\n",
    "\n",
    "SEC_FILLING = \"\"\"\n",
    "\n",
    " \tThree Months Ended\n",
    " \tApr 28, 2024\t\tApr 30, 2023\n",
    "Revenue\t$\t26,044 \t\t\t$\t7,192 \t\n",
    "Cost of revenue\t5,638 \t\t\t2,544 \t\n",
    "Gross profit\t20,406 \t\t\t4,648 \t\n",
    "Operating expenses\t \t\t \n",
    "Research and development\t2,720 \t\t\t1,875 \t\n",
    "Sales, general and administrative\t777 \t\t\t633 \t\n",
    "Total operating expenses\t3,497 \t\t\t2,508 \t\n",
    "Operating income\t16,909 \t\t\t2,140 \t\n",
    "Interest income\t359 \t\t\t150 \t\n",
    "Interest expense\t(64)\t\t\t(66)\t\n",
    "Other, net\t75 \t\t\t(15)\t\n",
    "Other income (expense), net\n",
    "370 \t\t\t69 \t\n",
    "Income before income tax\t17,279 \t\t\t2,209 \t\n",
    "Income tax expense\t2,398 \t\t\t166 \t\n",
    "Net income\t$\t14,881 \t\t\t$\t2,043 \t\n",
    "Net income per share:\t\t\t\n",
    "Basic\t$\t6.04 \t\t\t$\t0.83 \t\n",
    "Diluted\t$\t5.98 \t\t\t$\t0.82 \t\n",
    "Weighted average shares used in per share computation:\t\t\t\n",
    "Basic\t2,462 \t\t\t2,470 \t\n",
    "Diluted\t2,489 \t\t\t2,490 \t\n",
    " \n",
    "\n",
    "See accompanying Notes to Condensed Consolidated Financial Statements.\n",
    "3\n",
    "\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Condensed Consolidated Statements of Comprehensive Income\n",
    "(In millions)\n",
    "(Unaudited)\n",
    " \tThree Months Ended\n",
    " \tApr 28, 2024\t\tApr 30, 2023\n",
    " \t\t\t\n",
    "Net income\t$\t14,881 \t\t\t$\t2,043 \t\n",
    "Other comprehensive loss, net of tax\t\t\t\n",
    "Available-for-sale securities:\t\t\t\n",
    "Net change in unrealized gain (loss)\t(128)\t\t\t17 \t\n",
    "Cash flow hedges:\t\t\t\n",
    "Net change in unrealized loss\t(4)\t\t\t(13)\t\n",
    "Reclassification adjustments for net realized loss included in net income\t(4)\t\t\t(11)\t\n",
    "Net change in unrealized loss\t(8)\t\t\t(24)\t\n",
    "Other comprehensive loss, net of tax\t(136)\t\t\t(7)\t\n",
    "Total comprehensive income\t$\t14,745 \t\t\t$\t2,036 \t\n",
    " \n",
    "\n",
    "See accompanying Notes to Condensed Consolidated Financial Statements.\n",
    "\n",
    "4\n",
    "\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Condensed Consolidated Balance Sheets\n",
    "(In millions)\n",
    "(Unaudited)\n",
    " \tApr 28, 2024\t\tJan 28, 2024\n",
    "Assets\t\t\t\n",
    "Current assets:\t \t\t \n",
    "Cash and cash equivalents\t$\t7,587 \t\t\t$\t7,280 \t\n",
    "Marketable securities\t23,851 \t\t\t18,704 \t\n",
    "Accounts receivable, net\t12,365 \t\t\t9,999 \t\n",
    "Inventories\t5,864 \t\t\t5,282 \t\n",
    "Prepaid expenses and other current assets\t4,062 \t\t\t3,080 \t\n",
    "Total current assets\t53,729 \t\t\t44,345 \t\n",
    "Property and equipment, net\t4,006 \t\t\t3,914 \t\n",
    "Operating lease assets\t1,532 \t\t\t1,346 \t\n",
    "Goodwill\t4,453 \t\t\t4,430 \t\n",
    "Intangible assets, net\t986 \t\t\t1,112 \t\n",
    "Deferred income tax assets\t7,798 \t\t\t6,081 \t\n",
    "Other assets\t4,568 \t\t\t4,500 \t\n",
    "Total assets\t$\t77,072 \t\t\t$\t65,728 \t\n",
    "Liabilities and Shareholders' Equity\t \t\t \n",
    "Current liabilities:\t \t\t \n",
    "Accounts payable\t$\t2,715 \t\t\t$\t2,699 \t\n",
    "Accrued and other current liabilities\t11,258 \t\t\t6,682 \t\n",
    "Short-term debt\t1,250 \t\t\t1,250 \t\n",
    "Total current liabilities\t15,223 \t\t\t10,631 \t\n",
    "Long-term debt\t8,460 \t\t\t8,459 \t\n",
    "Long-term operating lease liabilities\t1,281 \t\t\t1,119 \t\n",
    "Other long-term liabilities\t2,966 \t\t\t2,541 \t\n",
    "Total liabilities\t27,930 \t\t\t22,750 \t\n",
    "Commitments and contingencies - see Note 12\t\t\t\n",
    "Shareholders’ equity:\t \t\t \n",
    "Preferred stock\t— \t\t\t— \t\n",
    "Common stock\t2 \t\t\t2 \t\n",
    "Additional paid-in capital\t12,651 \t\t\t13,132 \t\n",
    "Accumulated other comprehensive income (loss)\t(109)\t\t\t27 \t\n",
    "Retained earnings\t36,598 \t\t\t29,817 \t\n",
    "Total shareholders' equity\t49,142 \t\t\t42,978 \t\n",
    "Total liabilities and shareholders' equity\t$\t77,072 \t\t\t$\t65,728 \t\n",
    " \n",
    "\n",
    "See accompanying Notes to Condensed Consolidated Financial Statements.\n",
    "\n",
    "5\n",
    "\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Condensed Consolidated Statements of Shareholders' Equity\n",
    "For the Three Months Ended April 28, 2024 and April 30, 2023\n",
    "(Unaudited)  \n",
    "Common Stock\n",
    "Outstanding\t\tAdditional Paid-in Capital\t\tAccumulated Other Comprehensive Income (Loss)\t\tRetained Earnings\t\tTotal Shareholders' Equity\n",
    "Shares\t\tAmount\t\t\t\t\n",
    "(In millions, except per share data)\t\t\t\t\t\t\t\t\t\t\t\n",
    "Balances, Jan 28, 2024\t2,464 \t\t\t$\t2 \t\t\t$\t13,132 \t\t\t$\t27 \t\t\t$\t29,817 \t\t\t$\t42,978 \t\n",
    "Net income\t— \t\t\t— \t\t\t— \t\t\t— \t\t\t14,881 \t\t\t14,881 \t\n",
    "Other comprehensive loss\t— \t\t\t— \t\t\t— \t\t\t(136)\t\t\t— \t\t\t(136)\t\n",
    "Issuance of common stock from stock plans \t7 \t\t\t— \t\t\t285 \t\t\t— \t\t\t— \t\t\t285 \t\n",
    "Tax withholding related to vesting of restricted stock units\t(2)\t\t\t— \t\t\t(1,752)\t\t\t— \t\t\t— \t\t\t(1,752)\t\n",
    "Shares repurchased\t(10)\t\t\t— \t\t\t(33)\t\t\t— \t\t\t(8,002)\t\t\t(8,035)\t\n",
    "Cash dividends declared and paid ($0.04 per common share)\n",
    "— \t\t\t— \t\t\t— \t\t\t— \t\t\t(98)\t\t\t(98)\t\n",
    "Stock-based compensation\t— \t\t\t— \t\t\t1,019 \t\t\t— \t\t\t— \t\t\t1,019 \t\n",
    "Balances, Apr 28, 2024\t2,459 \t\t\t$\t2 \t\t\t$\t12,651 \t\t\t$\t(109)\t\t\t$\t36,598 \t\t\t$\t49,142 \t\n",
    "Balances, Jan 29, 2023\t2,466 \t\t\t$\t2 \t\t\t$\t11,971 \t\t\t$\t(43)\t\t\t$\t10,171 \t\t\t$\t22,101 \t\n",
    "Net income\t— \t\t\t— \t\t\t— \t\t\t— \t\t\t2,043 \t\t\t2,043 \t\n",
    "Other comprehensive loss\t— \t\t\t— \t\t\t— \t\t\t(7)\t\t\t— \t\t\t(7)\t\n",
    "Issuance of common stock from stock plans \t9 \t\t\t— \t\t\t246 \t\t\t— \t\t\t— \t\t\t246 \t\n",
    "Tax withholding related to vesting of restricted stock units\t(2)\t\t\t— \t\t\t(507)\t\t\t— \t\t\t— \t\t\t(507)\t\n",
    "Cash dividends declared and paid ($0.04 per common share)\n",
    "— \t\t\t— \t\t\t— \t\t\t— \t\t\t(99)\t\t\t(99)\t\n",
    "Stock-based compensation\t— \t\t\t— \t\t\t743 \t\t\t— \t\t\t— \t\t\t743 \t\n",
    "Balances, Apr 30, 2023\t2,473 \t\t\t$\t2 \t\t\t$\t12,453 \t\t\t$\t(50)\t\t\t$\t12,115 \t\t\t$\t24,520 \t\n",
    " \n",
    "See accompanying Notes to Condensed Consolidated Financial Statements.\n",
    "6\n",
    "\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Condensed Consolidated Statements of Cash Flows\n",
    "(In millions)\n",
    "(Unaudited) \n",
    " \tThree Months Ended\n",
    " \tApr 28, 2024\t\tApr 30, 2023\n",
    "Cash flows from operating activities:\t\t\t\n",
    "Net income\t$\t14,881 \t\t\t$\t2,043 \t\n",
    "Adjustments to reconcile net income to net cash provided by operating activities:\t\t\t\n",
    "Stock-based compensation expense\t1,011 \t\t\t735 \t\n",
    "Depreciation and amortization\t410 \t\t\t384 \t\n",
    "Realized and unrealized (gains) losses on investments in non-affiliated entities, net\t(69)\t\t\t14 \t\n",
    "Deferred income taxes\t(1,577)\t\t\t(1,135)\t\n",
    "Other\t(145)\t\t\t(34)\t\n",
    "Changes in operating assets and liabilities, net of acquisitions:\t\t\t\n",
    "Accounts receivable\t(2,366)\t\t\t(252)\t\n",
    "Inventories\t(577)\t\t\t566 \t\n",
    "Prepaid expenses and other assets\t(726)\t\t\t(215)\t\n",
    "Accounts payable\t(22)\t\t\t11 \t\n",
    "Accrued and other current liabilities\t4,202 \t\t\t689 \t\n",
    "Other long-term liabilities\t323 \t\t\t105 \t\n",
    "Net cash provided by operating activities\t15,345 \t\t\t2,911 \t\n",
    "Cash flows from investing activities:\t\t\t\n",
    "Proceeds from maturities of marketable securities\t4,004 \t\t\t2,512 \t\n",
    "Proceeds from sales of marketable securities\t149 \t\t\t— \t\n",
    "Purchases of marketable securities\t(9,303)\t\t\t(2,801)\t\n",
    "Purchases related to property and equipment and intangible assets\t(369)\t\t\t(248)\t\n",
    "Acquisitions, net of cash acquired\t(39)\t\t\t(83)\t\n",
    "Investments in non-affiliated entities\t(135)\t\t\t(221)\t\n",
    "Net cash used in investing activities\t(5,693)\t\t\t(841)\t\n",
    "Cash flows from financing activities:\t\t\t\n",
    "Proceeds related to employee stock plans\t285 \t\t\t246 \t\n",
    "Payments related to repurchases of common stock\t(7,740)\t\t\t— \t\n",
    "Payments related to tax on restricted stock units\t(1,752)\t\t\t(507)\t\n",
    "Dividends paid\t(98)\t\t\t(99)\t\n",
    "Principal payments on property and equipment and intangible assets\t(40)\t\t\t(20)\t\n",
    "Net cash used in financing activities\t(9,345)\t\t\t(380)\t\n",
    "Change in cash and cash equivalents\t307 \t\t\t1,690 \t\n",
    "Cash and cash equivalents at beginning of period\t7,280 \t\t\t3,389 \t\n",
    "Cash and cash equivalents at end of period\t$\t7,587 \t\t\t$\t5,079 \t\n",
    " \n",
    "See accompanying Notes to Condensed Consolidated Financial Statements.\n",
    "7\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Notes to Condensed Consolidated Financial Statements\n",
    "(Unaudited)\n",
    "\n",
    "\n",
    "Note 1 - Summary of Significant Accounting Policies\n",
    "Basis of Presentation\n",
    "The accompanying unaudited condensed consolidated financial statements were prepared in accordance with accounting principles generally accepted in the United States of America, or U.S. GAAP, for interim financial information and with the instructions to Form 10-Q and Article 10 of Securities and Exchange Commission, or SEC, Regulation S-X. The January 28, 2024 consolidated balance sheet was derived from our audited consolidated financial statements included in our Annual Report on Form 10-K for the fiscal year ended January 28, 2024, as filed with the SEC, but does not include all disclosures required by U.S. GAAP. In the opinion of management, all adjustments, consisting only of normal recurring adjustments considered necessary for a fair statement of results of operations and financial position, have been included. The results for the interim periods presented are not necessarily indicative of the results expected for any future period. The following information should be read in conjunction with the audited consolidated financial statements and notes thereto included in our Annual Report on Form 10-K for the fiscal year ended January 28, 2024. \n",
    "Significant Accounting Policies\n",
    "There have been no material changes to our significant accounting policies disclosed in Note 1 - Organization and Summary of Significant Accounting Policies, of the Notes to the Consolidated Financial Statements included in our Annual Report on Form 10-K for the fiscal year ended January 28, 2024.\n",
    "Fiscal Year\n",
    "We operate on a 52- or 53-week year, ending on the last Sunday in January. Fiscal years 2025 and 2024 are both 52-week years. The first quarters of fiscal years 2025 and 2024 were both 13-week quarters.\n",
    "Principles of Consolidation\n",
    "Our condensed consolidated financial statements include the accounts of NVIDIA Corporation and our wholly-owned subsidiaries. All intercompany balances and transactions have been eliminated in consolidation.\n",
    "Use of Estimates\n",
    "The preparation of financial statements in conformity with U.S. GAAP requires management to make estimates and assumptions that affect the reported amounts of assets and liabilities and disclosures of contingent assets and liabilities at the date of the financial statements and the reported amounts of revenue and expenses during the reporting period. Actual results could differ materially from our estimates. On an on-going basis, we evaluate our estimates, including those related to revenue recognition, cash equivalents and marketable securities, accounts receivable, inventories and product purchase commitments, income taxes, goodwill, stock-based compensation, litigation, investigation and settlement costs, property, plant, and equipment, and other contingencies. These estimates are based on historical facts and various other assumptions that we believe are reasonable.\n",
    "Recently Issued Accounting Pronouncements\n",
    "Recent Accounting Pronouncements Not Yet Adopted\n",
    "In November 2023, the Financial Accounting Standards Board, or FASB, issued a new accounting standard to provide for additional disclosures about significant expenses in operating segments. The standard is effective for our annual reporting starting with fiscal year 2025 and for interim period reporting starting in fiscal year 2026 retrospectively. We are currently evaluating the impact of this standard on our Consolidated Financial Statements.\n",
    "In December 2023, the FASB issued a new accounting standard which provides for new and updated income tax disclosures, including disaggregation of rate reconciliation and income taxes paid. The standard is effective for annual periods beginning after December 15, 2024. Early adoption is permitted and should be applied prospectively, with retrospective application permitted. We expect to adopt this standard in our annual reporting starting with fiscal year 2026. We are currently evaluating the impact of this standard on our Consolidated Financial Statements.\n",
    "\n",
    "\n",
    "\n",
    "8\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Notes to Condensed Consolidated Financial Statements (Continued)\n",
    "(Unaudited)\n",
    "Note 2 - Leases\n",
    "Our lease obligations primarily consist of operating leases for our headquarters complex, domestic and international office facilities, and data center space, with lease periods expiring between fiscal years 2025 and 2035.\n",
    "Future minimum lease payments under our non-cancelable operating leases as of April 28, 2024 were as follows:\n",
    "Operating Lease Obligations\n",
    " \t(In millions)\n",
    "Fiscal Year:\t \n",
    "2025 (excluding first quarter of fiscal year 2025)\n",
    "$\t221 \t\n",
    "2026\t306 \t\n",
    "2027\t290 \t\n",
    "2028\t270 \t\n",
    "2029\t236 \t\n",
    "2030 and thereafter\n",
    "410 \t\n",
    "Total\t1,733 \t\n",
    "Less imputed interest\t206 \t\n",
    "Present value of net future minimum lease payments\t1,527 \t\n",
    "Less short-term operating lease liabilities\t246 \t\n",
    "Long-term operating lease liabilities\t$\t1,281 \t\n",
    " \n",
    "In addition, we have operating leases, primarily for our data centers, that are expected to commence during fiscal year 2025 with lease terms of 2 to 11 years for $923 million.\n",
    "Operating lease expenses were $80 million and $59 million for the first quarter of fiscal years 2025 and 2024, respectively. Short-term and variable lease expenses for the first quarter of fiscal years 2025 and 2024 were not significant.\n",
    "Other information related to leases was as follows:\n",
    "Three Months Ended\n",
    "Apr 28, 2024\t\tApr 30, 2023\n",
    " \t(In millions)\n",
    "Supplemental cash flows information\t\t\t \n",
    "Operating cash flows used for operating leases\t$\t69 \t\t\t$\t61 \t\n",
    "Operating lease assets obtained in exchange for lease obligations\t250 \t\t\t106 \t\n",
    " \n",
    "As of April 28, 2024, our operating leases had a weighted average remaining lease term of 6.3 years and a weighted average discount rate of 3.89%. As of January 28, 2024, our operating leases had a weighted average remaining lease term of 6.1 years and a weighted average discount rate of 3.76%.\n",
    "9\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Notes to Condensed Consolidated Financial Statements (Continued)\n",
    "(Unaudited)\n",
    "Note 3 - Stock-Based Compensation\n",
    "Our stock-based compensation expense is associated with restricted stock units, or RSUs, performance stock units that are based on our corporate financial performance targets, or PSUs, performance stock units that are based on market conditions, or market-based PSUs, and our employee stock purchase plan, or ESPP.\n",
    "Our Condensed Consolidated Statements of Income include stock-based compensation expense, net of amounts capitalized into inventory and subsequently recognized to cost of revenue, as follows:\n",
    " \tThree Months Ended\n",
    " \tApr 28, 2024\t\tApr 30, 2023\n",
    "(In millions)\n",
    "Cost of revenue\t$\t36 \t\t\t$\t27 \t\n",
    "Research and development\t727 \t\t\t524 \t\n",
    "Sales, general and administrative\t248 \t\t\t184 \t\n",
    "Total\t$\t1,011 \t\t\t$\t735 \t\n",
    " \n",
    "Equity Award Activity\n",
    "The following is a summary of our equity award transactions under our equity incentive plans:\n",
    "RSUs, PSUs, and Market-based PSUs Outstanding\n",
    " \tNumber of Shares\t\tWeighted Average Grant-Date Fair Value Per Share\n",
    "(In millions, except per share data)\n",
    "Balances, Jan 28, 2024\t37 \t\t\t$\t245.94 \t\n",
    "Granted\t7 \t\t\t$\t801.79 \t\n",
    "Vested\t(6)\t\t\t$\t176.59 \t\n",
    "Balances, Apr 28, 2024\t38 \t\t\t$\t361.45 \t\n",
    " \n",
    "As of April 28, 2024, there was $13.2 billion of aggregate unearned stock-based compensation expense. This amount is expected to be recognized over a weighted average period of 2.6 years for RSUs, PSUs, and market-based PSUs, and 0.8 years for ESPP.\n",
    "Note 4 - Net Income Per Share\n",
    "The following is a reconciliation of the denominator of the basic and diluted net income per share computations for the periods presented:\n",
    " \tThree Months Ended\n",
    "Apr 28, 2024\t\tApr 30, 2023\n",
    " \t(In millions, except per share data)\n",
    "Numerator:\t \t\t \n",
    "Net income\t$\t14,881 \t\t\t$\t2,043 \t\n",
    "Denominator:\t\t\t\n",
    "Basic weighted average shares\t2,462 \t\t\t2,470 \t\n",
    "Dilutive impact of outstanding equity awards\t27 \t\t\t20 \t\n",
    "Diluted weighted average shares\t2,489 \t\t\t2,490 \t\n",
    "Net income per share:\t\t\t\n",
    "Basic (1)\t$\t6.04 \t\t\t$\t0.83 \t\n",
    "Diluted (2)\t$\t5.98 \t\t\t$\t0.82 \t\n",
    "Equity awards excluded from diluted net income per share because their effect would have been anti-dilutive\t6 \t\t\t4 \t\n",
    " \n",
    "(1)    Calculated as net income divided by basic weighted average shares.\n",
    "(2)    Calculated as net income divided by diluted weighted average shares.\n",
    "10\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Notes to Condensed Consolidated Financial Statements (Continued)\n",
    "(Unaudited)\n",
    "Diluted net income per share is computed using the weighted average number of common and potentially dilutive shares outstanding during the period, using the treasury stock method. Any anti-dilutive effect of equity awards outstanding is not included in the computation of diluted net income per share.\n",
    "Note 5 - Income Taxes\n",
    "Income tax expense was $2.4 billion and $166 million for the first quarter of fiscal years 2025 and 2024, respectively. Income tax expense as a percentage of income before income tax was 13.9% and 7.5% for the first quarter of fiscal years 2025 and 2024, respectively.\n",
    "\n",
    "The effective tax rate increased primarily due to a decreased effect of tax benefits from the foreign-derived intangible income deduction and stock-based compensation relative to the increase in income before income tax.\n",
    "\n",
    "Our effective tax rates for the first quarter of fiscal years 2025 and 2024 were lower than the U.S. federal statutory rate of 21% due to tax benefits from stock-based compensation, the foreign-derived intangible income deduction, income earned in jurisdictions that are subject to taxes lower than the U.S. federal statutory tax rate, and the U.S. federal research tax credit.\n",
    "\n",
    "While we believe that we have adequately provided for all uncertain tax positions, or tax positions where we believe it is not more-likely-than-not that the position will be sustained upon review, amounts asserted by tax authorities could be greater or less than our accrued position. Accordingly, our provisions on federal, state and foreign tax related matters to be recorded in the future may change as revised estimates are made or the underlying matters are settled or otherwise resolved with the respective tax authorities. As of April 28, 2024, we do not believe that our estimates, as otherwise provided for, on such tax positions will significantly increase or decrease within the next 12 months.\n",
    "Note 6 - Cash Equivalents and Marketable Securities \n",
    "Our cash equivalents and marketable securities related to publicly held debt securities are classified as “available-for-sale” debt securities.\n",
    "The following is a summary of cash equivalents and marketable securities:\n",
    " \tApr 28, 2024\n",
    "Amortized\n",
    "Cost\t\tUnrealized\n",
    "Gain\t\tUnrealized\n",
    "Loss\t\tEstimated\n",
    "Fair Value\t\tReported as\n",
    " \t\t\t\t\tCash Equivalents\t\tMarketable Securities\n",
    " \t(In millions)\n",
    "Corporate debt securities\t$\t11,397 \t\t\t$\t3 \t\t\t$\t(43)\t\t\t$\t11,357 \t\t\t$\t733 \t\t\t$\t10,624 \t\n",
    "Debt securities issued by the U.S. Treasury\t11,314 \t\t\t— \t\t\t(62)\t\t\t11,252 \t\t\t886 \t\t\t10,366 \t\n",
    "Money market funds\t5,374 \t\t\t— \t\t\t— \t\t\t5,374 \t\t\t5,374 \t\t\t— \t\n",
    "Debt securities issued by U.S. government agencies\t2,826 \t\t\t— \t\t\t(7)\t\t\t2,819 \t\t\t189 \t\t\t2,630 \t\n",
    "Certificates of deposit\t286 \t\t\t— \t\t\t— \t\t\t286 \t\t\t69 \t\t\t217 \t\n",
    "Foreign government bonds\t14 \t\t\t— \t\t\t— \t\t\t14 \t\t\t— \t\t\t14 \t\n",
    "Total\t$\t31,211 \t\t\t$\t3 \t\t\t$\t(112)\t\t\t$\t31,102 \t\t\t$\t7,251 \t\t\t$\t23,851 \t\n",
    " \n",
    "11\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Notes to Condensed Consolidated Financial Statements (Continued)\n",
    "(Unaudited)\n",
    " \tJan 28, 2024\n",
    "Amortized\n",
    "Cost\t\tUnrealized\n",
    "Gain\t\tUnrealized\n",
    "Loss\t\tEstimated\n",
    "Fair Value\t\tReported as\n",
    " \t\t\t\t\tCash Equivalents\t\tMarketable Securities\n",
    " \t(In millions)\n",
    "Corporate debt securities\t$\t10,126 \t\t\t$\t31 \t\t\t$\t(5)\t\t\t$\t10,152 \t\t\t$\t2,231 \t\t\t$\t7,921 \t\n",
    "Debt securities issued by the U.S. Treasury\t9,517 \t\t\t17 \t\t\t(10)\t\t\t9,524 \t\t\t1,315 \t\t\t8,209 \t\n",
    "Money market funds\t3,031 \t\t\t— \t\t\t— \t\t\t3,031 \t\t\t3,031 \t\t\t— \t\n",
    "Debt securities issued by U.S. government agencies\t2,326 \t\t\t8 \t\t\t(1)\t\t\t2,333 \t\t\t89 \t\t\t2,244 \t\n",
    "Certificates of deposit\t510 \t\t\t— \t\t\t— \t\t\t510 \t\t\t294 \t\t\t216 \t\n",
    "Foreign government bonds\t174 \t\t\t— \t\t\t— \t\t\t174 \t\t\t60 \t\t\t114 \t\n",
    "Total\t$\t25,684 \t\t\t$\t56 \t\t\t$\t(16)\t\t\t$\t25,724 \t\t\t$\t7,020 \t\t\t$\t18,704 \t\n",
    " \n",
    "The following tables provide the breakdown of unrealized losses, aggregated by investment category and length of time that individual securities have been in a continuous loss position:\n",
    "Apr 28, 2024\n",
    " \tLess than 12 Months\t\t12 Months or Greater\t\tTotal\n",
    " \tEstimated Fair Value\t\tGross Unrealized Loss\t\tEstimated Fair Value\t\tGross Unrealized Loss\t\tEstimated Fair Value\t\tGross Unrealized Loss\n",
    " \t(In millions)\n",
    "Debt securities issued by the U.S. Treasury\t$\t9,720 \t\t\t$\t(60)\t\t\t$\t756 \t\t\t$\t(2)\t\t\t$\t10,476 \t\t\t$\t(62)\t\n",
    "Corporate debt securities\t6,943 \t\t\t(42)\t\t\t188 \t\t\t(1)\t\t\t7,131 \t\t\t(43)\t\n",
    "Debt securities issued by U.S. government agencies\t2,391 \t\t\t(7)\t\t\t— \t\t\t— \t\t\t2,391 \t\t\t(7)\t\n",
    "Total\t$\t19,054 \t\t\t$\t(109)\t\t\t$\t944 \t\t\t$\t(3)\t\t\t$\t19,998 \t\t\t$\t(112)\t\n",
    " \n",
    "Jan 28, 2024\n",
    " \tLess than 12 Months\t\t12 Months or Greater\t\tTotal\n",
    " \tEstimated Fair Value\t\tGross Unrealized Loss\t\tEstimated Fair Value\t\tGross Unrealized Loss\t\tEstimated Fair Value\t\tGross Unrealized Loss\n",
    " \t(In millions)\n",
    "Debt securities issued by the U.S. Treasury\t$\t3,343 \t\t\t$\t(5)\t\t\t$\t1,078 \t\t\t$\t(5)\t\t\t$\t4,421 \t\t\t$\t(10)\t\n",
    "Corporate debt securities\t1,306 \t\t\t(3)\t\t\t618 \t\t\t(2)\t\t\t1,924 \t\t\t(5)\t\n",
    "Debt securities issued by U.S. government agencies\t670 \t\t\t(1)\t\t\t— \t\t\t— \t\t\t670 \t\t\t(1)\t\n",
    "Total\t$\t5,319 \t\t\t$\t(9)\t\t\t$\t1,696 \t\t\t$\t(7)\t\t\t$\t7,015 \t\t\t$\t(16)\t\n",
    " \n",
    "The gross unrealized losses are related to fixed income securities, driven primarily by changes in interest rates. Net realized gains and losses were not significant for all periods presented.\n",
    "12\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Notes to Condensed Consolidated Financial Statements (Continued)\n",
    "(Unaudited)\n",
    "The amortized cost and estimated fair value of cash equivalents and marketable securities are shown below by contractual maturity.\n",
    "Apr 28, 2024\t\tJan 28, 2024\n",
    "Amortized Cost\t\tEstimated Fair Value\t\tAmortized Cost\t\tEstimated Fair Value\n",
    "(In millions)\n",
    "Less than one year\t$\t16,811 \t\t\t$\t16,800 \t\t\t$\t16,336 \t\t\t$\t16,329 \t\n",
    "Due in 1 - 5 years\t14,400 \t\t\t14,302 \t\t\t9,348 \t\t\t9,395 \t\n",
    "Total\t$\t31,211 \t\t\t$\t31,102 \t\t\t$\t25,684 \t\t\t$\t25,724 \t\n",
    " \n",
    "Note 7 - Fair Value of Financial Assets and Liabilities and Investments in Non-Affiliated Entities\n",
    "The fair values of our financial assets and liabilities are determined using quoted market prices of identical assets or quoted market prices of similar assets from active markets. We review fair value hierarchy classification on a quarterly basis.\n",
    "Pricing Category\t\tFair Value at\n",
    "Apr 28, 2024\t\tJan 28, 2024\n",
    "(In millions)\n",
    "Assets\t\t\t\t\t\n",
    "Cash equivalents and marketable securities:\t\t\t\t\t\n",
    "Money market funds\tLevel 1\t\t$\t5,374 \t\t\t$\t3,031 \t\n",
    "Corporate debt securities\tLevel 2\t\t$\t11,357 \t\t\t$\t10,152 \t\n",
    "Debt securities issued by the U.S. Treasury\tLevel 2\t\t$\t11,252 \t\t\t$\t9,524 \t\n",
    "Debt securities issued by U.S. government agencies\tLevel 2\t\t$\t2,819 \t\t\t$\t2,333 \t\n",
    "Certificates of deposit\tLevel 2\t\t$\t286 \t\t\t$\t510 \t\n",
    "Foreign government bonds\tLevel 2\t\t$\t14 \t\t\t$\t174 \t\n",
    "Other assets (Investments in non-affiliated entities):\t\t\t\t\t\n",
    "Publicly-held equity securities\tLevel 1\t\t$\t287 \t\t\t$\t225 \t\n",
    "Liabilities (1)\t\t\t\t\t\n",
    "0.584% Notes Due 2024\n",
    "Level 2\t\t$\t1,242 \t\t\t$\t1,228 \t\n",
    "3.20% Notes Due 2026\n",
    "Level 2\t\t$\t960 \t\t\t$\t970 \t\n",
    "1.55% Notes Due 2028\n",
    "Level 2\t\t$\t1,096 \t\t\t$\t1,115 \t\n",
    "2.85% Notes Due 2030\n",
    "Level 2\t\t$\t1,331 \t\t\t$\t1,367 \t\n",
    "2.00% Notes Due 2031\n",
    "Level 2\t\t$\t1,026 \t\t\t$\t1,057 \t\n",
    "3.50% Notes Due 2040\n",
    "Level 2\t\t$\t805 \t\t\t$\t851 \t\n",
    "3.50% Notes Due 2050\n",
    "Level 2\t\t$\t1,487 \t\t\t$\t1,604 \t\n",
    "3.70% Notes Due 2060\n",
    "Level 2\t\t$\t368 \t\t\t$\t403 \t\n",
    " \n",
    "\n",
    "(1)    These liabilities are carried on our Condensed Consolidated Balance Sheets at their original issuance value, net of unamortized debt discount and issuance costs.\n",
    "Investments in Non-Affiliated Entities\n",
    "Our investments in non-affiliated entities include marketable equity securities, which are publicly traded, and non-marketable equity securities, which are primarily investments in privately held companies.\n",
    "Our marketable equity securities have readily determinable fair values and are recorded in long-term other assets on our Condensed Consolidated Balance Sheets at fair value with changes in fair value recorded in Other income and expense, net on our Condensed Consolidated Statements of Income. Marketable equity securities totaled $287 million and $225 million as of April 28, 2024 and January 28, 2024, respectively. The net unrealized and realized gains and losses of investments in marketable securities were not significant for the first quarter of fiscal years 2025 and 2024.\n",
    "13\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Notes to Condensed Consolidated Financial Statements (Continued)\n",
    "(Unaudited)\n",
    "Our non-marketable equity securities are recorded in long-term other assets on our Condensed Consolidated Balance Sheets and valued under the measurement alternative. The carrying value of our non-marketable equity securities totaled $1.5 billion and $1.3 billion as of April 28, 2024 and January 28, 2024, respectively. Gains and losses on these investments, realized and unrealized, are recognized in Other income and expense, net on our Condensed Consolidated Statements of Income.\n",
    " \n",
    "(1)    During the first quarter of fiscal years 2025 and 2024, we recorded an inventory provision of $210 million and $105 million, respectively, in cost of revenue.\n",
    "\n",
    " \tApr 28, 2024\t\tJan 28, 2024\n",
    "Other Assets:\t(In millions)\n",
    "Prepaid supply and capacity agreements (1)\t$\t2,232 \t\t\t$\t2,458 \t\n",
    "Investments in non-affiliated entities\t1,750 \t\t\t1,546 \t\n",
    "Prepaid royalties\t358 \t\t\t364 \t\n",
    "Other\t228 \t\t\t132 \t\n",
    "\n",
    "We recognized $188 million in revenue in the first quarter of fiscal year 2025 from deferred revenue as of January 28, 2024.\n",
    "Revenue allocated to remaining performance obligations, which includes deferred revenue and amounts that will be invoiced and recognized as revenue in future periods, was $1.3 billion as of April 28, 2024. We expect to recognize approximately 38% of this revenue over the next twelve months and the remainder thereafter. This excludes revenue related to performance obligations for contracts with a length of one year or less.\n",
    "16\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Notes to Condensed Consolidated Financial Statements (Continued)\n",
    "(Unaudited)\n",
    "Note 10 - Derivative Financial Instruments\n",
    "We enter into foreign currency forward contracts to mitigate the impact of foreign currency exchange rate movements on our operating expenses. These contracts are designated as cash flow hedges for hedge accounting treatment. Gains or losses on the contracts are recorded in accumulated other comprehensive income or loss and reclassified to operating expense when the related operating expenses are recognized in earnings or ineffectiveness should occur.\n",
    "We also enter into foreign currency forward contracts to mitigate the impact of foreign currency movements on monetary assets and liabilities. The change in fair value of these non-designated contracts is recorded in other income or expense and offsets the change in fair value of the hedged foreign currency denominated monetary assets and liabilities, which is also recorded in other income or expense.\n",
    "The table below presents the notional value of our foreign currency contracts outstanding:\n",
    " \tApr 28, 2024\t\tJan 28, 2024\n",
    "(In millions)\n",
    "Designated as cash flow hedges\t$\t1,198 \t\t\t$\t1,168 \t\n",
    "Non-designated hedges\t$\t704 \t\t\t$\t597 \t\n",
    " \n",
    "The unrealized gains and losses or fair value of our foreign currency contracts was not significant as of April 28, 2024 and January 28, 2024.\n",
    "As of April 28, 2024, all designated foreign currency contracts mature within 18 months. The expected realized gains and losses deferred to accumulated other comprehensive income or loss related to foreign currency contracts was not significant.\n",
    "During the first quarter of fiscal years 2025 and 2024, the impact of derivative financial instruments designated for hedge accounting treatment in other comprehensive income or loss was not significant and the instruments were determined to be highly effective.\n",
    "Note 11 - Debt\n",
    "Long-Term Debt\n",
    "Expected\n",
    "Remaining Term (years)\t\tEffective\n",
    "Interest Rate\t\tCarrying Value at\n",
    "Apr 28, 2024\t\tJan 28, 2024\n",
    "(In millions)\n",
    "0.584% Notes Due 2024\n",
    "0.1\t\t0.66%\t\t1,250 \t\t\t1,250 \t\n",
    "3.20% Notes Due 2026\n",
    "2.4\t\t3.31%\t\t1,000 \t\t\t1,000 \t\n",
    "1.55% Notes Due 2028\n",
    "4.1\t\t1.64%\t\t1,250 \t\t\t1,250 \t\n",
    "2.85% Notes Due 2030\n",
    "5.9\t\t2.93%\t\t1,500 \t\t\t1,500 \t\n",
    "2.00% Notes Due 2031\n",
    "7.1\t\t2.09%\t\t1,250 \t\t\t1,250 \t\n",
    "3.50% Notes Due 2040\n",
    "15.9\t\t3.54%\t\t1,000 \t\t\t1,000 \t\n",
    "3.50% Notes Due 2050\n",
    "25.9\t\t3.54%\t\t2,000 \t\t\t2,000 \t\n",
    "3.70% Notes Due 2060\n",
    "36.0\t\t3.73%\t\t500 \t\t\t500 \t\n",
    "Unamortized debt discount and issuance costs\t\t\t\t\t\t(40)\t\t\t(41)\t\n",
    "Net carrying amount\t\t\t\t\t\t9,710 \t\t\t9,709 \t\n",
    "Less short-term portion\t\t\t\t\t\t(1,250)\t\t\t(1,250)\t\n",
    "Total long-term portion\t\t\t\t\t\t$\t8,460 \t\t\t$\t8,459 \t\n",
    " \n",
    "Our notes are unsecured senior obligations. Existing and future liabilities of our subsidiaries will be effectively senior to the notes. Our notes pay interest semi-annually. We may redeem each of our notes prior to maturity, as defined in the applicable form of note. The maturity of the notes are calendar year.\n",
    "As of April 28, 2024, we were in compliance with the required covenants, which are non-financial in nature, under the outstanding notes.\n",
    "17\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Notes to Condensed Consolidated Financial Statements (Continued)\n",
    "(Unaudited)\n",
    "Commercial Paper\n",
    "We have a $575 million commercial paper program to support general corporate purposes. As of April 28, 2024, we had no commercial paper outstanding.\n",
    "Note 12 - Commitments and Contingencies\n",
    "Purchase Obligations\n",
    "Our purchase obligations reflect our commitment to purchase components used to manufacture our products, including long-term supply and capacity agreements, certain software and technology licenses, other goods and services and long-lived assets.\n",
    "As of April 28, 2024, we had outstanding inventory purchases and long-term supply and capacity obligations totaling $18.8 billion. We enter into agreements with contract manufacturers that allow them to procure inventory based upon our defined criteria, and in certain instances, these agreements are cancellable, able to be rescheduled, and adjustable for our business needs prior to placing firm orders. These changes may result in costs incurred through the date of cancellation. Other non-inventory purchase obligations were $10.6 billion, including $8.8 billion of multi-year cloud service agreements. We expect our cloud service agreements to be used to support our research and development efforts and our DGX Cloud offerings.\n",
    "Total future purchase commitments as of April 28, 2024 are as follows:\n",
    "Commitments\n",
    " \t(In millions)\n",
    "Fiscal Year:\t \n",
    "2025 (excluding first quarter of fiscal year 2025)\n",
    "$\t19,306 \t\n",
    "2026\t3,438 \t\n",
    "2027\t2,573 \t\n",
    "2028\t2,222 \t\n",
    "2029\t1,585 \t\n",
    "2030 and thereafter\n",
    "249 \t\n",
    "Total\t$\t29,373 \t\n",
    " \n",
    "In addition to the purchase commitments included in the table above, at the end of the first quarter of fiscal year 2025, we had commitments of approximately $1.2 billion to complete business combinations, subject to closing conditions, and acquire land and buildings.\n",
    "Accrual for Product Warranty Liabilities\n",
    "The estimated amount of product warranty liabilities was $532 million and $306 million as of April 28, 2024 and January 28, 2024, respectively. The estimated product returns and product warranty activity consisted of the following:\n",
    "Three Months Ended\n",
    "Apr 28, 2024\t\tApr 30, 2023\n",
    "(In millions)\n",
    "Balance at beginning of period\t$\t306 \t\t\t$\t82 \t\n",
    "Additions\t234 \t\t\t13 \t\n",
    "Utilization\t(8)\t\t\t(18)\t\n",
    "Balance at end of period\t$\t532 \t\t\t$\t77 \t\n",
    " \n",
    "We have provided indemnities for matters such as tax, product, and employee liabilities. We have included intellectual property indemnification provisions in our technology-related agreements with third parties. Maximum potential future payments cannot be estimated because many of these agreements do not have a maximum stated liability. We have not recorded any liability in our Condensed Consolidated Financial Statements for such indemnifications.\n",
    "18\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Notes to Condensed Consolidated Financial Statements (Continued)\n",
    "(Unaudited)\n",
    "Litigation\n",
    "Securities Class Action and Derivative Lawsuits\n",
    "The plaintiffs in the putative securities class action lawsuit, captioned 4:18-cv-07669-HSG, initially filed on December 21, 2018 in the United States District Court for the Northern District of California, and titled In Re NVIDIA Corporation Securities Litigation, filed an amended complaint on May 13, 2020. The amended complaint asserted that NVIDIA and certain NVIDIA executives violated Section 10(b) of the Securities Exchange Act of 1934, as amended, or the Exchange Act, and SEC Rule 10b-5, by making materially false or misleading statements related to channel inventory and the impact of cryptocurrency mining on GPU demand between May 10, 2017 and November 14, 2018. Plaintiffs also alleged that the NVIDIA executives who they named as defendants violated Section 20(a) of the Exchange Act. Plaintiffs sought class certification, an award of unspecified compensatory damages, an award of reasonable costs and expenses, including attorneys’ fees and expert fees, and further relief as the Court may deem just and proper. On March 2, 2021, the district court granted NVIDIA’s motion to dismiss the complaint without leave to amend, entered judgment in favor of NVIDIA and closed the case. On March 30, 2021, plaintiffs filed an appeal from judgment in the United States Court of Appeals for the Ninth Circuit, case number 21-15604. On August 25, 2023, a majority of a three-judge Ninth Circuit panel affirmed in part and reversed in part the district court’s dismissal of the case, with a third judge dissenting on the basis that the district court did not err in dismissing the case. On November 15, 2023, the Ninth Circuit denied NVIDIA’s petition for rehearing en banc of the Ninth Circuit panel’s majority decision to reverse in part the dismissal of the case, which NVIDIA had filed on October 10, 2023. On November 21, 2023, NVIDIA filed a motion with the Ninth Circuit for a stay of the mandate pending NVIDIA’s petition for a writ of certiorari in the Supreme Court of the United States and the Supreme Court’s resolution of the matter. On December 5, 2023, the Ninth Circuit granted NVIDIA’s motion to stay the mandate. NVIDIA filed a petition for a writ of certiorari on March 4, 2024. Four amicus briefs in support of NVIDIA’s petition were filed on April 5, 2024.\n",
    "The putative derivative lawsuit pending in the United States District Court for the Northern District of California, captioned 4:19-cv-00341-HSG, initially filed January 18, 2019 and titled In re NVIDIA Corporation Consolidated Derivative Litigation, was stayed pending resolution of the plaintiffs’ appeal in the In Re NVIDIA Corporation Securities Litigation action. On February 22, 2022, the court administratively closed the case, but stated that it would reopen the case once the appeal in the In Re NVIDIA Corporation Securities Litigation action is resolved. The stay remains in place. The lawsuit asserts claims, purportedly on behalf of us, against certain officers and directors of the Company for breach of fiduciary duty, unjust enrichment, waste of corporate assets, and violations of Sections 14(a), 10(b), and 20(a) of the Exchange Act based on the dissemination of allegedly false and misleading statements related to channel inventory and the impact of cryptocurrency mining on GPU demand. The plaintiffs are seeking unspecified damages and other relief, including reforms and improvements to NVIDIA’s corporate governance and internal procedures.\n",
    "The putative derivative actions initially filed September 24, 2019 and pending in the United States District Court for the District of Delaware, Lipchitz v. Huang, et al. (Case No. 1:19-cv-01795-UNA) and Nelson v. Huang, et. al. (Case No. 1:19-cv-01798- UNA), remain stayed pending resolution of the plaintiffs’ appeal in the In Re NVIDIA Corporation Securities Litigation action. The lawsuits assert claims, purportedly on behalf of us, against certain officers and directors of the Company for breach of fiduciary duty, unjust enrichment, insider trading, misappropriation of information, corporate waste and violations of Sections 14(a), 10(b), and 20(a) of the Exchange Act based on the dissemination of allegedly false, and misleading statements related to channel inventory and the impact of cryptocurrency mining on GPU demand. The plaintiffs seek unspecified damages and other relief, including disgorgement of profits from the sale of NVIDIA stock and unspecified corporate governance measures.\n",
    "Another putative derivative action was filed on October 30, 2023 in the Court of Chancery of the State of Delaware, captioned Horanic v. Huang, et al. (Case No. 2023-1096-KSJM). This lawsuit asserts claims, purportedly on behalf of us, against certain officers and directors of the Company for breach of fiduciary duty and insider trading based on the dissemination of allegedly false and misleading statements related to channel inventory and the impact of cryptocurrency mining on GPU demand. The plaintiffs seek unspecified damages and other relief, including disgorgement of profits from the sale of NVIDIA stock and reform of unspecified corporate governance measures. This derivative matter is stayed pending the final resolution of In Re NVIDIA Corporation Securities Litigation action.\n",
    "Accounting for Loss Contingencies\n",
    "As of April 28, 2024, there are no accrued contingent liabilities associated with the legal proceedings described above based on our belief that liabilities, while possible, are not probable. Further, except as described above, any possible loss or range of loss in these matters cannot be reasonably estimated at this time. We are engaged in legal actions not described above arising in the ordinary course of business and, while there can be no assurance of favorable outcomes, we believe that the ultimate outcome of these actions will not have a material adverse effect on our operating results, liquidity or financial position.\n",
    "19\n",
    "NVIDIA Corporation and Subsidiaries\n",
    "Notes to Condensed Consolidated Financial Statements (Continued)\n",
    "(Unaudited)\n",
    "Note 13 - Shareholders’ Equity \n",
    "Capital Return Program \n",
    "During the first quarter of fiscal year 2025, we repurchased 9.9 million shares of our common stock for $8.0 billion. We did not repurchase any shares during the first quarter of fiscal year 2024. As of April 28, 2024, we were authorized, subject to certain specifications, to repurchase up to $14.5 billion additional shares of our common stock. Our share repurchase program aims to offset dilution from shares issued to employees. We may pursue additional share repurchases as we weigh market factors and other investment opportunities.\n",
    "From April 29, 2024 through May 24, 2024, we repurchased 2.3 million shares for $2.1 billion pursuant to a Rule 10b5-1 trading plan.\n",
    "During the first quarter of fiscal years 2025 and 2024, we paid $98 million and $99 million in cash dividends to our shareholders, respectively. Our cash dividend program and the payment of future cash dividends under that program are subject to our Board of Directors' continuing determination that the dividend program and the declaration of dividends thereunder are in the best interests of our shareholders.\n",
    "Note 14 - Segment Information\n",
    "Our Chief Executive Officer is our chief operating decision maker, or CODM, and reviews financial information presented on an operating segment basis for purposes of making decisions and assessing financial performance.\n",
    "The Compute & Networking segment includes our Data Center accelerated computing platform; networking; automotive artificial intelligence, or AI, Cockpit, autonomous driving development agreements, and autonomous vehicle solutions; electric vehicle computing platforms; Jetson for robotics and other embedded platforms; NVIDIA AI Enterprise and other software; and DGX Cloud.\n",
    "The Graphics segment includes GeForce GPUs for gaming and PCs, the GeForce NOW game streaming service and related infrastructure, and solutions for gaming platforms; Quadro/NVIDIA RTX GPUs for enterprise workstation graphics; virtual GPU software for cloud-based visual and virtual computing; automotive platforms for infotainment systems; and Omniverse Enterprise software for building and operating 3D internet applications.\n",
    "Operating results by segment include costs or expenses directly attributable to each segment, and costs or expenses that are leveraged across our unified architecture and therefore allocated between our two segments.\n",
    "The “All Other” category includes the expenses that our CODM does not assign to either Compute & Networking or Graphics for purposes of making operating decisions or assessing financial performance. The expenses include stock-based compensation expense, corporate infrastructure and support costs, acquisition-related and other costs, and other non-recurring charges and benefits that our CODM deems to be enterprise in nature.\n",
    "Our CODM does not review any information regarding total assets on a reportable segment basis. Depreciation and amortization expenses directly attributable to each reportable segment are included in operating results for each segment. However, our CODM does not evaluate depreciation and amortization expense by operating segment and, therefore, it is not separately presented. The accounting policies for segment reporting are the same as for our consolidated financial statements. The table below presents details of our reportable segments and the “All Other” category.\n",
    " \tCompute & Networking\t\tGraphics\t\tAll Other\t\tConsolidated\n",
    " \t(In millions)\n",
    "Three Months Ended Apr 28, 2024\n",
    " \t\t \t\t \t\t \n",
    "Revenue\t$\t22,675 \t\t\t$\t3,369 \t\t\t$\t— \t\t\t$\t26,044 \t\n",
    "Operating income (loss)\t$\t17,047 \t\t\t$\t1,241 \t\t\t$\t(1,379)\t\t\t$\t16,909 \t\n",
    "Three Months Ended Apr 30, 2023\n",
    " \t\t \t\t \t\t \n",
    "Revenue\t$\t4,460 \t\t\t$\t2,732 \t\t\t$\t— \t\t\t$\t7,192 \t\n",
    "Operating income (loss)\t$\t2,160 \t\t\t$\t1,046 \t\t\t$\t(1,066)\t\t\t$\t2,140 \t\n",
    " \n",
    "\n",
    "\"\"\"\n",
    "\n",
    "# Add\n",
    "\n",
    "\n",
    "def cost_reduction_analyst():\n",
    "    return \"\"\"\n",
    "\n",
    "    You are a Cost Reduction Analyst. \n",
    "    Your task is to thoroughly analyze NVIDIA's SEC 10-K filings to identify areas where the company can reduce expenditures. Focus on evaluating operating expenses, administrative costs, research and development (R&D) expenditures, and capital expenditures. Look for patterns of excessive spending, inefficiencies, and opportunities for cost savings. Provide a detailed report outlining specific areas where costs can be cut and suggest practical measures for achieving these reductions.\n",
    "    \n",
    "    When finished make a call to the phone number provided and summarize your findings to the person on the other end of the line.\n",
    "\n",
    "    \"\"\"\n",
    "\n",
    "\n",
    "def revenue_maximalist_analyst():\n",
    "    return \"\"\"\n",
    "\n",
    "    You are a Revenue Maximization Analyst. \n",
    "    Your task is to examine NVIDIA's SEC 10-K filings to identify opportunities to maximize revenues. Analyze revenue streams from different product lines, geographical markets, and customer segments. Look for underperforming areas, untapped markets, and potential for price adjustments. Provide a comprehensive report on strategies to increase revenues, such as expanding product offerings, entering new markets, or optimizing pricing strategies.\n",
    "\n",
    "    \"\"\"\n",
    "\n",
    "\n",
    "def operational_efficiency():\n",
    "    return \"\"\"\n",
    "    You are an Operational Efficiency and Cost Control Specialist. \n",
    "    Your task is to review NVIDIA's SEC 10-K filings to evaluate the company's operational efficiency and identify opportunities for cost control. Focus on areas such as supply chain management, manufacturing processes, and inventory management. Look for inefficiencies, bottlenecks, and areas where costs can be controlled without compromising quality. Provide a detailed analysis and recommendations for improving operational efficiency and reducing costs.\n",
    "\n",
    "    \"\"\"\n",
    "\n",
    "\n",
    "def strategic_investment_analyst():\n",
    "    return \"\"\"\n",
    "\n",
    "    You are a Strategic Investment Analyst. \n",
    "    Your task is to analyze NVIDIA's SEC 10-K filings to evaluate the company's investment strategies and identify areas where expenditures can be optimized. Focus on R&D investments, capital projects, and acquisition strategies. Assess the return on investment (ROI) for significant expenditures and identify any investments that are not yielding expected returns. Provide a detailed report on how NVIDIA can reallocate or reduce investments to maximize financial performance.\n",
    "\n",
    "    \"\"\"\n",
    "\n",
    "\n",
    "def sales_marketing_agent_prompt():\n",
    "    return \"\"\"\n",
    "    You are a Sales and Marketing Optimization Specialist. Your task is to examine NVIDIA's SEC 10-K filings to evaluate the effectiveness of the company's sales and marketing efforts and identify areas where expenditures can be reduced while maximizing revenue. Analyze marketing expenses, sales strategies, and customer acquisition costs. Look for areas where spending can be optimized and suggest strategies for increasing marketing efficiency and sales effectiveness. Provide a comprehensive report with actionable recommendations.\n",
    "\n",
    "    These prompts will help each agent focus on specific aspects of NVIDIA's expenditures and revenue opportunities, ensuring a thorough analysis aimed at cutting costs and maximizing revenues.\n",
    "\n",
    "    \"\"\"\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "\n",
    "# Initialize the director agent\n",
    "cost_reduction_agent = Agent(\n",
    "    agent_name=\"Cost Reduction Analyst\",\n",
    "    system_prompt=cost_reduction_analyst(),\n",
    "    llm=llm,\n",
    "    max_loops=1,\n",
    "    dashboard=False,\n",
    "    state_save_file_type=\"json\",\n",
    "    saved_state_path=\"cost_reduction_analyst.json\",\n",
    ")\n",
    "\n",
    "# Initialize the agents\n",
    "revenue_maximalist_agent = Agent(\n",
    "    agent_name=\"Revenue Maximization Analyst\",\n",
    "    system_prompt=revenue_maximalist_analyst(),\n",
    "    llm=llm,\n",
    "    max_loops=1,\n",
    "    dashboard=False,\n",
    "    state_save_file_type=\"json\",\n",
    "    saved_state_path=\"revenue_maximalist_analyst.json\",\n",
    "\n",
    ")\n",
    "\n",
    "cost_control_agent = Agent(\n",
    "    agent_name=\"Operational Efficiency and Cost Control Specialist\",\n",
    "    system_prompt=operational_efficiency(),\n",
    "    llm=llm,\n",
    "    max_loops=1,\n",
    "    dashboard=False,\n",
    "    state_save_file_type=\"json\",\n",
    "    saved_state_path=\"operational_efficiency.json\",\n",
    "\n",
    ")\n",
    "\n",
    "investment_analyst_agent = Agent(\n",
    "    agent_name=\"Strategic Investment Analyst\",\n",
    "    system_prompt=strategic_investment_analyst(),\n",
    "    llm=llm,\n",
    "    max_loops=1,\n",
    "    dashboard=False,\n",
    "    state_save_file_type=\"json\",\n",
    "    saved_state_path=\"strategic_investment_analyst.json\",\n",
    ")\n",
    "\n",
    "sales_marketing_agent = Agent(\n",
    "    agent_name=\"Sales and Marketing Optimization Specialist\",\n",
    "    system_prompt=sales_marketing_agent_prompt(),\n",
    "    llm=llm,\n",
    "    max_loops=1,\n",
    "    dashboard=False,\n",
    "    state_save_file_type=\"json\",\n",
    "    saved_state_path=\"sales_marketing_agent.json\",\n",
    ")\n",
    "\n",
    "\n",
    "final_agent = Agent(\n",
    "    agent_name=\"Final Agent\",\n",
    "    system_prompt=\"You are the final agent. Please summarize the findings of the previous agents and provide a comprehensive report on how NVIDIA can optimize its financial performance. When finished make a call to the phone number provided and summarize your findings to the person on the other end of the line. Summarize the points such as how to lower the costs and increase the revenue.\",\n",
    "    llm=llm,\n",
    "    max_loops=1,\n",
    "    dashboard=False,\n",
    "    state_save_file_type=\"json\",\n",
    ")\n",
    "\n",
    "\n",
    "agents = [\n",
    "    cost_reduction_agent,\n",
    "    revenue_maximalist_agent,\n",
    "    cost_control_agent,\n",
    "    investment_analyst_agent,\n",
    "    sales_marketing_agent,\n",
    "]\n",
    "\n",
    "\n",
    "# Swarm\n",
    "swarm = MixtureOfAgents(\n",
    "    name=\"Mixture of Accountants\",\n",
    "    agents=agents,\n",
    "    layers=1,\n",
    "    final_agent=final_agent,\n",
    ")\n",
    "\n",
    "\n",
    "# Run the swarm\n",
    "out = swarm.run(\n",
    "    f\"Analyze the following Nvidia financial data and locate unnecessary expenditures: {SEC_FILLING}\"\n",
    ")\n",
    "print(out)\n"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
